package com.ymatou.iapi.godmch.service;

import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.shop2cn.iapi.sqdistributor.parameter.response.GetDistributorManageListResponse;
import com.ymatou.iapi.godmch.parameter.AgentTypeVoAndCode;
import com.ymatou.iapi.godmch.parameter.MchInfoVo;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
/**
*商户信息Call
*FreeMaker Template自动生成代码
*/
public class detailmchCall extends YmatouBaseCall{
	private static String opurl ="api/mch/detail";
	
	public detailmchCall() {
		super(EnvSetup.getSystemUrl("godmch_iapi"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
//		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	public MchInfoVo getResult() {
		MchInfoVo result =null;
		
		
		try {
			result = (MchInfoVo) new Gson().fromJson(getJsonObject().get("result").toString(), new TypeToken<MchInfoVo>() {}.getType());
		} catch (Exception e) {
//			e.printStackTrace();
		}
		return result;
	}
}